package com.example.user;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
public class UserController {
    @Resource
    private UserRepository userRepository;

    @GetMapping("/user")
    public List<User> list() {
        return userRepository.findAll();
    }
}
